# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1069.104.1 -> 1.1069.104.2
#	  drivers/acpi/bus.c	1.18    -> 1.19   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/14	herbert@gondor.apana.org.au	1.1069.105.1
# [netdrvr tg3] fix tqueue initialization
# 
# Fixes crash.
# --------------------------------------------
# 03/11/14	marcelo@logos.cnet	1.1069.1.136
# Merge bk://gkernel.bkbits.net/net-drivers-2.4
# into logos.cnet:/home/marcelo/bk/linux-2.4
# --------------------------------------------
# 03/11/14	davej@redhat.com	1.1069.1.137
# [PATCH] Peter Kosinar: CMPCI crash fix
# 
# --------------------------------------------
# 03/11/14	bjorn.helgaas@hp.com	1.1069.104.2
# ACPI: Fix acpi_bus_add() error that caused some devices to be erroneously ignored.
# 
# This caused the CBN PCI root bridge on ia64 i2000 boxes to be ignored.  This
# is where the AGP bridge lives.
# --------------------------------------------
#
diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
--- a/drivers/acpi/bus.c	Fri Nov 14 16:33:38 2003
+++ b/drivers/acpi/bus.c	Fri Nov 14 16:33:38 2003
@@ -1407,16 +1407,14 @@
 	switch (type) {
 	case ACPI_BUS_TYPE_DEVICE:
 		result = acpi_bus_get_status(device);
-		if (result)
-			goto end;
-		break;
+		if (!result)
+			break;
+		if (!device->status.present)
+			result = -ENOENT;
+		goto end;
 	default:
 		STRUCT_TO_INT(device->status) = 0x0F;
 		break;
-	}
-	if (!device->status.present) {
-		result = -ENOENT;
-		goto end;
 	}
 
 	/*